﻿<%@ Page Language="C#" AutoEventWireup="True" Codebehind="Privilege.aspx.cs" Inherits="ControlPanel_Role_Privilege"
    StylesheetTheme="MainStyle" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>选择权限</title>
    <script type="text/javascript" language="javascript">
		///功能：选中和取消页面上面的所有选框，和<INPUT id="chkAll" type="checkbox" onclick="CheckAll(this.form)"></INPUT> 配合使用
		///作者：温正宇
		function CheckAll(form)
		{
		    for (var i=0;i<form.elements.length;i++)
		    {
			    var e = form.elements[i];
			    if (e.id != "chkAll"&&e.disabled==false && e.type=="checkbox" && e.id != "revCheck")
			    {
			         e.checked = form.chkAll.checked;
                }
			}
		}
		function RevCheck(form){
		for (var i=0;i<form.elements.length;i++){
			var e = form.elements[i];
			if (e.id != "chkAll" && e.disabled==false && e.type=="checkbox" && e.id != "revCheck")
			 e.checked = !e.checked;
			}
		}
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div align="left" style="margin-left: 5px; text-align: center">
                请选择角色：
                <asp:Label ID="lbl_RoleName" runat="server"></asp:Label>
                的权限<br />
                <br />
                当前权限组：<asp:Label ID="lbl_GroupName" runat="server"></asp:Label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="chkAll" name="chkAll" type="checkbox" onclick="CheckAll(this.form)" />全部选择
                <input id="revCheck" name="revCheck" type="checkbox" onclick="RevCheck(this.form)" />反向选择
                <br />
                <br />
                <asp:GridView ID="gv_Privilege" runat="server" CellPadding="4" ForeColor="#333333"
                    GridLines="None" OnRowCreated="gv_Privilege_RowCreated">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" />
                    <EditRowStyle BackColor="#2461BF" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                    <EmptyDataTemplate>
                        <br />
                        <font color="red" size="2">您还未配置权限，请使用WFMConfig配置工具进行配置！！</font>
                        <br />
                    </EmptyDataTemplate>
                </asp:GridView>
                &nbsp;<br />
                <br />
                <asp:Button ID="btn_Save" runat="server" Text="保存" OnClick="btn_Save_Click" />
                <input id="Reset1" type="reset" value="重置" />
                <br />
                <br />
                <asp:Label ID="lbl_SaveResult" runat="server" ForeColor="red" Text=""></asp:Label>
            </div>        
    </form>

    

</body>
</html>
